package com.lyx.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyx.common.dto.UserCouponDetail;
import com.lyx.server.entity.UserCoupon;
import org.apache.ibatis.annotations.Select;

/**
 * ⽤户优惠券表(UserCoupon)表数据库访问层
 *
 * @author McMeloxD
 * @since 2024-08-14 17:41:03
 */
public interface UserCouponDao extends BaseMapper<UserCoupon> {
    @Select("select uc.*,c.title ctitle from t_user_coupon uc inner join t_coupon c on uc.cid=c.id where uc.uid=#{uid} order by uc.status,uc.end_date desc")
    UserCouponDetail selectDetail(Integer uid);
}

